
import request from '@/utils/request'

// 删除部门
export function delDepartment(id) {
  return request({
    method: 'DELETE',
    url: `/company/department/${id}`
  })
}

// 获取部门详情
export function getDepartment(id) {
  return request({
    method: 'GET',
    url: '/company/department/' + id
  })
}

// 编辑部门
export function editDepartment(data) {
  return request({
    method: 'PUT',
    url: '/company/department/' + data.id,
    data
  })
}

// 添加部门
export function addDepartment(data) {
  return request({
    method: 'POST',
    url: '/company/department',
    data
  })
}

// 获取部门负责人列表
export function getManagerList() {
  return request({
    method: 'GET',
    url: '/sys/user/simple'
  })
}

// 获取部门列表
export function getDepartments() {
  return request({
    method: 'GET',
    url: '/company/department'
  })
}
